package cn.jsj.hzu.qm.facecloud.ciuser.pojo;

import java.util.Objects;

public class Cilabrecord {
	private int id;
	private String labname;
	private String record;
	private String recorddate;
	private String who;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getLabname() {
		return labname;
	}
	public void setLabname(String labname) {
		this.labname = labname;
	}
	public String getRecord() {
		return record;
	}
	public void setRecord(String record) {
		this.record = record;
	}
	public String getRecorddate() {
		return recorddate;
	}
	public void setRecorddate(String recorddate) {
		this.recorddate = recorddate;
	}
	public String getWho() {
		return who;
	}
	public void setWho(String who) {
		this.who = who;
	}
	@Override
	public int hashCode() {
		return Objects.hash(id, labname, record, recorddate, who);
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Cilabrecord other = (Cilabrecord) obj;
		return id == other.id && Objects.equals(labname, other.labname) && Objects.equals(record, other.record)
				&& Objects.equals(recorddate, other.recorddate) && Objects.equals(who, other.who);
	}
	
	
	
	@Override
	public String toString() {
		return "Cilabrecord [id=" + id + ", labname=" + labname + ", record=" + record + ", recorddate=" + recorddate
				+ ", who=" + who + "]";
	}
	public Cilabrecord(int id, String labname, String record, String recorddate, String who) {
		super();
		this.id = id;
		this.labname = labname;
		this.record = record;
		this.recorddate = recorddate;
		this.who = who;
	}
	public Cilabrecord() {
		super();
	}
	public String toJsonString() {
		String jsonString = this.toString();
		
		jsonString = jsonString.substring(jsonString.indexOf('['));
		
		jsonString = jsonString.replace("[", "{\"");
		jsonString = jsonString.replace("]", "\"}");
		
		jsonString = jsonString.replace("=", "\":\"");
		jsonString = jsonString.replace(", ", ",");
		jsonString = jsonString.replace(",", "\",\"");
		return jsonString;
	}
	
	
	
}
